   1 19:09:14
<template id="table1">
  <div>

    <table border="1">
      <tr>
        <th>编号</th>
        <th>类型名</th>
        <th>子菜单</th>
        <th>路径</th>
        <th>备注</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
      <tr v-for="(index) in list">
        <td v-for="(value) in index">{{value}}</td>
        <td> <button @click="del(index.tid)">删除</button></td>
      </tr>
    </table>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  name: 'FuserManager',
  data () {
    return {
      list: []
    }
  },
  components:{
    "table1":{
      template:"table1",
      props:{
        list:[],
        title:""
      }
    }
  },
  created() {
    this.$http.post('/type/select').then(data=>{
      this.list = data;
    })
  },
  methods:{
    del(tid){
      // alert(id);
      // var params = new URLSearchParams();
      // params.append('id', '70');
      var f = new FormData()
      f.append('tid', tid)

      axios.post("http://localhost:8081/type/delete",f);
      //$.post("http://localhost:8080/texture/select");
      window.location.reload();
    },
  }
}
</script>

<style scoped>

</style>

